let player_data = null;

NetworkEvents.dataReceived('weak_sleep', (event) => {
    player_data = event.data.get('days').toString().slice(0, -1) 
})

ClientEvents.tick((event) => {
    const player = event.player
    
    // 显示时间
    player.paint({
        example_rectangle:{
            type: 'text',
            text: `已有${player_data}天未休息`,
            scale: 1.5,
            x: -4,
            y: 4,
            alignX: 'right',
            draw: 'always'
        }
    })
})